#ifndef _TEST_APP
#define _TEST_APP




#define OF_ADDON_USING_OFXNETWORK

#include "ofMain.h"
#include "ofAddons.h"
class Player {
public:
	int client;
	float posX;
};

class Ball {
public:
	float posX, posY;
};

class testApp : public ofSimpleApp{
	
	public:
		
		void setup();
		void update();
		void draw();
		
		void keyPressed(int key);
		void keyReleased(int key);
		void mouseMoved(int x, int y );
		void mouseDragged(int x, int y, int button);
		void mousePressed(int x, int y, int button);
		void mouseReleased();

		ofxTCPClient tcpClient;
	ofxUDPManager udpClient;
	
		ofTrueTypeFont  mono;
		ofTrueTypeFont  monosm;
	
		bool weConnected;
	int connectTime;
	string msgRx;
	
	bool serverConnected;
	int latency ;
	int timeSincePing;
	bool waitingForPingResponse;
	
	int dT;
	
	int playerNumber;
	
	Ball ball;
	Player players[2];
	int timeSincePlayerUpdate;
	
	string server;
	int tcpPort, udpPort;
};

#endif	

